package com.huaweicloud.sdk.evs.v2.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.util.Objects;
import java.util.function.Consumer;

/**
 * This is a auto create Body Object
 */
public class CinderAcceptVolumeTransferRequestBody {

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonProperty(value = "accept")

    private CinderAcceptVolumeTransferOption accept;

    public CinderAcceptVolumeTransferRequestBody withAccept(CinderAcceptVolumeTransferOption accept) {
        this.accept = accept;
        return this;
    }

    public CinderAcceptVolumeTransferRequestBody withAccept(Consumer<CinderAcceptVolumeTransferOption> acceptSetter) {
        if (this.accept == null) {
            this.accept = new CinderAcceptVolumeTransferOption();
            acceptSetter.accept(this.accept);
        }

        return this;
    }

    /**
     * Get accept
     * @return accept
     */
    public CinderAcceptVolumeTransferOption getAccept() {
        return accept;
    }

    public void setAccept(CinderAcceptVolumeTransferOption accept) {
        this.accept = accept;
    }

    @Override
    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        CinderAcceptVolumeTransferRequestBody that = (CinderAcceptVolumeTransferRequestBody) obj;
        return Objects.equals(this.accept, that.accept);
    }

    @Override
    public int hashCode() {
        return Objects.hash(accept);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class CinderAcceptVolumeTransferRequestBody {\n");
        sb.append("    accept: ").append(toIndentedString(accept)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}
